using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using ADESSA.Entities;
using ADESSA.Business;
using FetCo.Data;
using FetCo.Framework;

public partial class Wire_Transfer : System.Web.UI.Page
{
    ADESSA.Entities.Member _Member = new ADESSA.Entities.Member();
    ADESSA.Entities.Company _Company = new ADESSA.Entities.Company();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
            return;
        LoadInfo();
    }
    #region LoadDataInfo
    private void LoadInfo()
    {
        if (Session["MemberId"] != null)
        {
            _Member = MemberService.GetMember(long.Parse(Session["MemberId"].ToString()));
            if (_Member != null)
            {
                Criteria cri = new Criteria();
                cri.add("[" + ADESSA.Entities.Company._Table + "].[" + CompanyColumns.MemberID + "]", _Member.MemberID, Condition.EQUAL, Condition.AND);
                CompanyCollection _CompanyCollection = CompanyService.GetCompanyListByParam("[" + ADESSA.Entities.Company._Table + "].[" + CompanyColumns.CompanyID + "]", OrderDirection.ASC, cri.Criter);
                if (_CompanyCollection.Count > 0)
                {
                    _Company = _CompanyCollection[0];
                }
                ltrComName.Text = _Company.CompanyName;
                ltrmemID.Text = "santila_" + _Member.MemberID.ToString();
                ltrNumber.Text = _Member.Other;
                MembershipFee _MembershipFee = MembershipFeeService.GetMembershipFee(_Member.MembershipFeeID);
                if (_MembershipFee != null)
                {
                    ltrTitFree.Text = _MembershipFee.Title;
                }


            }
        }
        else
            Response.Redirect("MemberLogin.aspx");
    }

    #endregion
}
